﻿@model IEnumerable<MerchantTribeStore.Areas.account.Models.SavedItemViewModel>
@{
    ViewBag.Title = "Saved Items";
    Layout = "~/Areas/Account/Views/Shared/_AccountLayout.cshtml";
}
@Html.Raw((string)TempData["messages"])
<h1>@ViewBag.Title</h1>
<div class="categorydetailedlisttemplate">
    <div class="categorydetailedlisttemplaterecords">
        @foreach (var item in Model)
        {
            <div class="record">
                <div class="recordimage">
                    <a href="@item.FullProduct.ProductLink">
                        <img src="@item.FullProduct.ImageUrl" border="0" alt="@item.FullProduct.Item.ImageFileSmallAlternateText" /></a>
                </div>
                <div class="recordsku">
                    <a href="@item.FullProduct.ProductLink">@item.FullProduct.Item.Sku</a>
                </div>
                <div class="recordname">
                    <a href="@item.FullProduct.ProductLink">@item.FullProduct.Item.ProductName</a>
                </div>
                <div class="recordshortdescription">
                    @Html.Raw(item.FullProduct.Item.LongDescription)
                </div>
                <div class="recordprice">
                    <a href="@item.FullProduct.ProductLink">@Html.Raw(item.FullProduct.UserPrice.DisplayPrice(true))</a>
                </div>
                <div class="recordcontrols">
                    <table>
                    <tr>
                        <td><form action="@Url.Content("~/account/saveditems/delete")" method="post">
                            <input type="hidden" name="itemid" value="@item.SavedItem.Id" />
                            <input type="image" src="@Html.Raw(ViewBag.XButton)" alt="Remove Saved Item" />
                        </form></td>
                        <td><form action="@Url.Content("~/account/saveditems/addtocart")" method="post">
                            <input type="hidden" name="itemid" value="@item.SavedItem.Id" />
                            <input type="image" src="@Html.Raw(ViewBag.AddButton)" alt="Add to Cart" />
                        </form></td>
                    </tr>
                    </table>
                </div>
            </div>
        }
        <div class="clear">
        </div>
    </div>
</div>
